﻿using BCMongoEntity.TMS.Location.Driver;
using MongoDB.Bson;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCMongoData.TMS.Location.Driver
{
    public interface IDriverLocationMongoData
    {
        /// <summary>
        /// 获取附近几公里的司机信息
        /// </summary>
        /// <param name="location">指定的经纬度位置</param>
        /// <param name="maxDistance">最大几公里</param>
        /// <param name="query"></param>
        /// <param name="projections"></param>
        /// <returns></returns>
        IEnumerable<DriverLocationNearEntity> GetGeoNearLocationsByCoordinate(double[] location, double maxDistance, List<BsonElement> query, List<BsonElement> projections);

        /// <summary>
        /// 更新指定的司机位置信息
        /// </summary> 
        /// <param name="driver">司机信息</param>
        /// <returns></returns>
        DriverLocationEntity Update(DriverLocationEntity driver);
        /// <summary>
        /// 获取司机位置信息
        /// </summary>
        /// <param name="vehicleNo">车牌号</param>
        /// <returns></returns>
        Task<DriverLocationEntity> GetDriverLocationInfo(string vehicleNo);
    }
}
